package com.lam.framework.bean.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lam.common.components.parameter.service.ConfigService;
import com.lam.common.utils.StringUtils;
import com.lam.framework.bean.mapper.ParameterMapper;

/**
 * 参数配置Service业务层处理
 * 
 * @author admin
 * @date 2022-09-20
 */
@Service
public class ConfigServiceImpl implements ConfigService {

    @Autowired
    private ParameterMapper parameterMapper;

    @Override
	public String selectByKey(String configKey) {
		if (StringUtils.isBlank(configKey) || StringUtils.isContainChinese(configKey)) {
            return null;
        }
        return parameterMapper.selectValue(configKey.trim());
	}
    
}
